<?php
/**
 * a database field - DjModel attributes
 */

class DjField {

    /**
     *
     */
    public function get() {
        return $this->value;
    }

    /**
     * may raise exception
     */
    public function set($value) {
        $this->value = $value;
        return true;
    }

    /**
     * converts from DataBase to PHP
     * @param mixed $value
     * @return mixed
     */
    public function fromDb($value) {

    }

    /**
     * converts from  PHP to DataBase
     * @param mixed $value
     * @return bool
     */
    public function toDb($value) {

    }

    protected $value;

    /**
     * @var bool NULL values allowed
     */
    protected $null = false;

    /**
     *  @var bool empty strings allowed
     */
    protected $blank = false;

    /**
     * @var string
     */
    protected $help_text;

    /**
     * @var bool
     */
    protected $primary_key;

    /**
     * @var bool
     */
    protected $unique;

    /**
     * @var string
     */
    protected $db_column;



}